package com.chenbei.erp.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chenbei.common.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Schema(description = "仓库")
@Data
@TableName("erp_warehouse")
public class Warehouse extends BaseEntity {

    @Schema(description = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "名称")
    @TableField("name")
    @NotBlank(message = "名称不能为空")
    private String name;

    @Schema(description = "省份ID")
    @TableField("province_id")
    private Long provinceId;

    @Schema(description = "城市ID")
    @TableField("city_id")
    private Long cityId;

    @Schema(description = "地址")
    private String address;

    @Schema(description = "容量(立方)")
    @TableField(exist = false)
    private Float capacity;

    @Schema(description = "高度(米)")
    @TableField(exist = false)
    private Float height;

    @Schema(description = "状态[0:禁用|1:启用]")
    private Integer status;

    @Schema(description = "管理员")
    @TableField("manager_name")
    private String managerName;

    @Schema(description = "管理员联系号码")
    @TableField("manager_phone")
    private String managerPhone;

    @Schema(description = "备注")
    @TableField("remarks")
    private String remarks;
}
